package cn.emailChat.ai.dto;

import lombok.Getter;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description 投到消息队列中的消息体
 * @Author susu
 * @Date 2025/8/18
 */
@Getter
public class MailInboundEvent implements Serializable {
    private String messageId;
    private String subject;
    private String fromEmail;
    private String toEmail;
    private Date receivedDate;
    private String plainText;

    public MailInboundEvent() {}

    public MailInboundEvent(String messageId, String subject, String fromEmail,
                            String toEmail, Date receivedDate, String plainText) {
        this.messageId = messageId;
        this.subject = subject;
        this.fromEmail = fromEmail;
        this.toEmail = toEmail;
        this.receivedDate = receivedDate;
        this.plainText = plainText;
    }

    public void setMessageId(String messageId) { this.messageId = messageId; }

    public void setSubject(String subject) { this.subject = subject; }

    public void setFromEmail(String fromEmail) { this.fromEmail = fromEmail; }

    public void setToEmail(String toEmail) { this.toEmail = toEmail; }

    public void setReceivedDate(Date receivedDate) { this.receivedDate = receivedDate; }

    public void setPlainText(String plainText) { this.plainText = plainText; }

    @Override public String toString() {
        return "MailInboundEvent{" +
                "messageId='" + messageId + '\'' +
                ", subject='" + subject + '\'' +
                ", fromEmail='" + fromEmail + '\'' +
                ", toEmail='" + toEmail + '\'' +
                ", receivedDate=" + receivedDate +
                '}';
    }
}

